package com.zhuzi;

import com.zhuzi.webservice.ICatService;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.junit.jupiter.api.Test;

/**
 * @author zhuzi
 * 2022/9/14 16:28
 */
public class SendWsClass {
    @Test
    public void sendByClass() throws Exception {
        JaxWsProxyFactoryBean svr = new JaxWsProxyFactoryBean();
        svr.setServiceClass(ICatService.class);
        //svr.setAddress("http://localhost:9000/helloWorld");
        svr.setAddress("http://127.0.0.1:8082/Service/CatService?wsdl");
        ICatService hw = (ICatService) svr.create();

        System.out.println(hw.message("刘晓。。。。。。。。。"));
    }
}
